﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CoolERP_Entities;

namespace CoolERP_DAL
{
    public interface IZL_YWLSHDAL : IDAL<ZL_YWLSH>
    {
    }

    public class ZL_YWLSHDAL : BaseDAL<ZL_YWLSH>, IZL_YWLSHDAL
    {
        public ZL_YWLSHDAL(IUnitOfWork context)
            : base(context)
        {
        }

        public override ZL_YWLSH GetEntity(Func<ZL_YWLSH, bool> exp)
        {
            var entity = dataContext.ZL_YWLSH.FirstOrDefault(exp);
            if (entity != null)
                dataContext.Detach(entity);
            return entity;
        }
    }
}
